package com.lcf.system.controller;


import cn.dev33.satoken.annotation.SaCheckPermission;
import com.lcf.system.service.RuleUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 规则报名表(RuleUser)表控制层
 *
 * @author lcf
 * @since 2025-05-03 11:45:10
 */
@Tag(name = "规则报名表")
@RestController
@RequestMapping("ruleUser")
public class RuleUserController {
    @Resource
    private RuleUserService ruleUserService;

    /**
     * 报名
     */
    @Operation(summary = "报名")
    @SaCheckPermission("ruleUser:signUp")
    @PostMapping("{ruleId}")
    public boolean signUp(@PathVariable @Schema(description = "规则ID") long ruleId) {
        return ruleUserService.signUp(ruleId);
    }
}

